package cn.lili.controller.feign.system;

import cn.lili.modules.other.service.PageDataService;
import cn.lili.modules.page.entity.dos.PageData;
import cn.lili.modules.system.client.PageDataClient;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequiredArgsConstructor
public class PageDataFeignController implements PageDataClient {
    private final PageDataService pageDataService;
    @Override
    public List<PageData> getListByGoodsId(String goodsId) {
        return pageDataService.getByGoodsId(goodsId);
    }

    @Override
    public void updateByPageData(PageData pageData) {
        pageDataService.updateById(pageData);
    }
}
